<template>
  <view class="main-container">
		<!--订单列表-->
		<view class="policy_list" scroll-y="true" enable-flex  @scrolltolower="scrollToLower">
			<view style="margin: 0 35rpx;" class="report_project">
				<uni-grid :column="2" style="margin: 15rpx 0rpx;" :showBorder="false">
					<block v-for="(item,index) in rencaiList" :key="index">
						<uni-grid-item style="width:187px;height:140px">
							<view  @click="
										index == 0 ? listTechPerson()
										:index == 1 ? listTechNewPerson()
										:index == 2 ? listNewTeam()
										:index == 3 ? listTechManager()
										:index == 4 ? listProgrammer()
										:''
										" 
								:class="index%2==0?'view_item_right':'view_item_left'">
								<image :src="item.imageUrl" mode="aspectFit"
								style="width: 50px;height: 50px;"></image>
								<view>
									{{item.name}}
								</view>
							</view>
						</uni-grid-item>
					</block>
				</uni-grid>
			</view>
		</view>
	  </view>
</template>

<script>
	import orderTabBar from '@/wxcomponents/tab_bar.vue';
	export default {
		components: {
			orderTabBar,
		},
		data() {
			return {
				showPage: false,
				// 订单列表tab项
				tabList: [
				  {
					status: '1',
					title: '园区申报'
				  },
					{
					  status: 2,
					  title: '项目申报'
					},
					{
					  status: 3,
					  title: '人才申报'
					}
				],
				// 当前选择tab项
				currentIndex: 0,
				// 当前查询状态
				currentStatus: '1',
				// 订单列表高度
				orderHeight: 0,
				// 是否还有更多数据
				noMoreData: {},
				rencaiList:[
					{
						name:'科技人才',id:'0',imageUrl:'../http://113.142.144.25:9301/statics/appimg/member_report_search_new.png'
					},
					{
						name:'科技青年新星',id:'1',imageUrl:'../http://113.142.144.25:9301/statics/appimg/newyounger_report_search_new.png'
					},
					{
						name:'新双创队伍',id:'2',imageUrl:'../http://113.142.144.25:9301/statics/appimg/team_report_search_new.png'
					},
					{
						name:'科技经纪人',id:'3',imageUrl:'../http://113.142.144.25:9301/statics/appimg/manager_report_search_new.png'
					},
					{
						name:'科学家/工程师',id:'4',imageUrl:'../http://113.142.144.25:9301/statics/appimg/programmer_report_search_new.png'
					},
				]
			}
		},
		methods: {
			// tab切换
			clickTabBar(index, status) {
				this.currentIndex = index
				this.currentStatus = status
			},
			//人才申报
			listTechPerson(){
				uni.navigateTo({
					url:'/subpages/pages/reportList/member/techPersonList?type=1'
				})
			},
			listTechNewPerson(){
				uni.navigateTo({
					url:'/subpages/pages/reportList/member/techPersonList?type=2'
				})
			},
			listNewTeam(){
				uni.navigateTo({
					url:'/subpages/pages/reportList/member/techPersonList?type=3'
				})
			},
			listTechManager(){
				uni.navigateTo({
					url:'/subpages/pages/reportList/member/techPersonList?type=4'
				})
			},
			listProgrammer(){
				uni.navigateTo({
					url:'/subpages/pages/reportList/member/techPerson?type=5'
				})
			}
		},
		computed: {
				
		}	
	}
</script>

<style>
	
	.head {
		width: 100%;
		height:200rpx;
		background-color: #016fb8;
	}
	
	.search {
		background-color: #fff;
		width: 90%;
		margin: 35rpx auto;
		height: 60rpx;
		border-radius: 30rpx;
	}
	
	.main-container {
	  width: 100vw;
	  height: 100vh;
	  display: flex;
	  flex-direction: column;
	  justify-content: flex-start;
	  align-items: center;
	  background-color: #e6e6e6;
	}

	.main-container .tab-bar {
	  width: 100%;
	}

	.main-container .policy_list {
	  width: 100%;
	  height: fit-content;
	  padding-top: 70rpx;
	  display: flex;
	  flex-direction: column;
	  justify-content: flex-start;
	  background-color: #fff;
	}
	
	.view_item_left{
		height:140rpx;
		font-size: 35rpx;
		color: #fff;
		padding: 30rpx;
		border-radius: 10rpx;
/* 		margin-bottom: 30rpx; */
		margin-left: 30rpx;
		text-align: center;
		background-color: coral;
		float: left;
	}
	.view_item_right{
		height:140rpx;
		font-size: 35rpx;
		color: #fff;
		padding: 30rpx;
		border-radius: 10rpx;
	/* 	margin-bottom: 30rpx; */
		margin-right: 30rpx;
		text-align: center;
		background-color: cadetblue;
		float: right;
	}
</style>